package com.dime.physical.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dime.physical.mapper.DimePhysicaladviceMapper;
import com.dime.physical.domain.DimePhysicaladvice;
import com.dime.physical.service.IDimePhysicaladviceService;

/**
 * 人员健康建议Service业务层处理
 * 
 * @author Tiny
 * @date 2023-09-14
 */
@Service
public class DimePhysicaladviceServiceImpl implements IDimePhysicaladviceService 
{
    @Autowired
    private DimePhysicaladviceMapper dimePhysicaladviceMapper;

    /**
     * 查询人员健康建议
     * 
     * @param id 人员健康建议主键
     * @return 人员健康建议
     */
    @Override
    public DimePhysicaladvice selectDimePhysicaladviceById(String id)
    {
        return dimePhysicaladviceMapper.selectDimePhysicaladviceById(id);
    }

    /**
     * 查询人员健康建议列表
     * 
     * @param dimePhysicaladvice 人员健康建议
     * @return 人员健康建议
     */
    @Override
    public List<DimePhysicaladvice> selectDimePhysicaladviceList(DimePhysicaladvice dimePhysicaladvice)
    {
        return dimePhysicaladviceMapper.selectDimePhysicaladviceList(dimePhysicaladvice);
    }

    /**
     * 新增人员健康建议
     * 
     * @param dimePhysicaladvice 人员健康建议
     * @return 结果
     */
    @Override
    public int insertDimePhysicaladvice(DimePhysicaladvice dimePhysicaladvice)
    {
        dimePhysicaladvice.setCreateTime(DateUtils.getNowDate());
        return dimePhysicaladviceMapper.insertDimePhysicaladvice(dimePhysicaladvice);
    }

    /**
     * 修改人员健康建议
     * 
     * @param dimePhysicaladvice 人员健康建议
     * @return 结果
     */
    @Override
    public int updateDimePhysicaladvice(DimePhysicaladvice dimePhysicaladvice)
    {
        dimePhysicaladvice.setUpdateTime(DateUtils.getNowDate());
        return dimePhysicaladviceMapper.updateDimePhysicaladvice(dimePhysicaladvice);
    }

    /**
     * 批量删除人员健康建议
     * 
     * @param ids 需要删除的人员健康建议主键
     * @return 结果
     */
    @Override
    public int deleteDimePhysicaladviceByIds(String[] ids)
    {
        return dimePhysicaladviceMapper.deleteDimePhysicaladviceByIds(ids);
    }

    /**
     * 删除人员健康建议信息
     * 
     * @param id 人员健康建议主键
     * @return 结果
     */
    @Override
    public int deleteDimePhysicaladviceById(String id)
    {
        return dimePhysicaladviceMapper.deleteDimePhysicaladviceById(id);
    }
}
